This disclosure relates generally to online systems, and more specifically to presentation of content including images and text to users of an online system.
Online systems, such as social networking systems, allow online system users to connect to and to communicate with other online system users. Users may create profiles on an online system that are tied to their identities and include information about the users, such as interests and demographic information. The users may be individuals or entities such as corporations or charities. Online systems allow users to easily communicate with other users and to share content with other users by providing content items to an online system for presentation to the other users. Content items provided to an online system by a user may include declarative information about the user, status updates, check-ins to locations, images, photographs, videos, text, and/or any other information the user wishes to share with additional users of the online system. An online system may also generate content items for presentation to a user, such as content items describing actions taken by other users on the online system.
Online systems commonly present their users with feeds of content that include multiple content items selected for presentation to a user by an online system. For example, a feed of content presented to a user includes a display area in which one or more content items selected for presentation to the user are displayed at a single time and in which additional content items selected for presentation to the user are displayed if the user interacts with the feed of content. Each content item selected for presentation to a user in a feed of content may include multiple content item components, such as images and text associated with the images. For example, a user may upload a photo to the online system along with text that provides a caption for the photo if the user wishes to share the photo and caption with additional online system users; both the photo and text may be subsequently selected by the online system for simultaneous presentation in a content item included in a feed of content provided to an additional user.
Multiple components of content items simultaneously presented as a content item in a feed of content may be displayed in various configurations. For example, a content item including an image and text may be displayed in a feed of content presented to a user in a configuration in which the image and text are adjacent to each other. As users of online systems more frequently access content via mobile devices or other devices with a limited display area, however, online systems may display various components of content items in configurations that reduce the size of the display area in which a content item is presented in a feed of content. For example, if the online system selects a content item including an image and text describing the image for presentation to a user in a feed of content, the text may be overlaid on the image when presented in the feed of content rather than being displayed adjacent to the image. This allows an online system to present multiple content items to a user in a manner that increases the number of content items capable of presentation to the user via mobile devices or other devices having a limited display area.
However, while conventional methods for overlaying text on an image allow online systems to reduce the size of the display area in which a content item including text and an image is presented, certain visual characteristics of an image may render text difficult or even impossible to read if overlaid on the image. For example, images having certain magnitudes of brightness may provide too much or not enough background illumination for text to be easily readable if overlaid on the image (e.g., the text appears too faded or washed out against the image to be easily read). As another example, images having highly contrasting colors may be too visually distracting to allow text to be easily read if overlaid on the image. Additionally, text overlaid on an image may obscure and/or be obscured by certain details in the image, such as faces or other text included in the image. As a result, conventional methods for overlaying text onto images included in content items often lead to user frustration and a subsequent decline in user engagement with the online system. Thus, there is a need for improvements to methods for presenting online system users with content items including images and text.